from appium.webdriver.common.mobileby import MobileBy

from AppWorkWxin.PO.basepage import BasePage



class DefaultPage(BasePage):

    def get_title(self):
        # ele_title = self.find(MobileBy.XPATH, "//*[@resource-id='com.tencent.wework:id/hc0' and @text contains('消息')]")
        ele_title = self.driver.find_element_by_android_uiautomator(
            'new UiSelector().resourceId("com.tencent.wework:id/hc0").textContains("消息")')
        print(ele_title.text)
        return  ele_title.text